package com.aipp.mall.sms.controller;

import com.aipp.mall.common.model.SmsResult;
import com.aipp.mall.sms.service.SmsService;
import jakarta.annotation.Resource;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author cc
 */
@RestController
@RequestMapping("/no-auth/sms")
public class SmsController {

    @Resource
    private SmsService smsService;

    /**
     * 阿里云短信服务
     */
    @GetMapping("/{phones}")
    public ResponseEntity<SmsResult> sendAliYun(@PathVariable String phones) {
        return smsService.sendAliYun(phones);
    }

}
